import Vue from 'vue'
import Vuex from 'vuex'

import mutations from "./mutations";
import actions from "./actions";
import getters from "./getters";

// 1.安装
Vue.use(Vuex)
// 2.穿进Store对象
const state = {
    // 数组中放商品对象
    cartlist:[]
  }

export default new Vuex.Store({
  state,
  // mutations用于修改state中的值，要在actions进行提交修改
  mutations,
  actions,
  getters,
  modules: {
  }
})
